<template>
  <div>
    <el-container>
      <el-header>
        <el-menu mode="horizontal">
          <el-menu-item index="1" @click="baiduMap">首页</el-menu-item>

          <el-menu-item index="2" @click="userMap">个人中心</el-menu-item>
          <el-menu-item index="3" @click="userOrders">查看订单</el-menu-item>

          <el-menu-item index="4">
          <a href="http://localhost:9999/SP/" target="_blank">
          积分商城
          </a>
        </el-menu-item>

          <el-menu-item index="4" @click="out">安全退出</el-menu-item>
        </el-menu>
      </el-header>
      <el-main>
        <router-view />
      </el-main>
    </el-container>
  </div>
</template>

<script>
export default {
  methods: {
    //用户首页查看地图
    baiduMap() {
      this.$router.push("/UHome/BDMap");
    },
    // 个人中心
    userMap() {
      this.$router.push("/UHome/UserMap");
    },
    // 查看历史订单
    userOrders() {
      this.$router.push("/UHome/UOrders");
    },
    //退出
    out() {
      sessionStorage.clear;
      this.$router.push("/Login");
    },
  },
};
</script>

<style scoped>
.el-header,
.el-footer {
  background-color: #409eff;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  line-height: 50px;
}

body > .el-container {
  margin-bottom: 40px;
}
</style>